package com.barudisshu.repository;

import com.barudisshu.domain.Storage;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;


@Repository
@CacheConfig(cacheNames = "storage")
public interface StorageRepository extends CrudRepository<Storage, Long> {

    @Cacheable
    Storage findByAlpha(String filename);
    @Cacheable
    Storage findByHashed(String hash);
    @Cacheable
    Storage findByPath(String path);
}
